import axiosApi from './AxiosApi.js'

const apiList = {
  // 查询设备
  pageInstrument: {
    url: `/xssc/home/pageInstrument`,
    method: 'POST'
  },
  // 血样统计
  summarySampleStatus: {
    url: `/xssc/home/summarySampleStatus`,
    method: 'POST'
  },
  // 公告列表
  announcement: {
    url: `/xssc//home/pageAnnouncement`,
    method: 'POST'
  },
  // 新增公告
  addAnnouncement: {
    url: `/xssc/announcement`,
    method: 'POST'
  },
  // 获取用户组织
  getByUser: {
    url: `/xssc/home/getByUser`,
    method: 'GET'
  },
}

export default {
  pageInstrument (data) {
    return axiosApi({
      ...apiList.pageInstrument,
      // formData: true,
      data
    })
  },
  summarySampleStatus (data) {
    return axiosApi({
      ...apiList.summarySampleStatus,
      // formData: true,
      data
    })
  },
  announcement (data) {
    return axiosApi({
      ...apiList.announcement,
      // formData: true,
      data
    })
  },
  addAnnouncement (data) {
    return axiosApi({
      ...apiList.addAnnouncement,
      // formData: true,
      data
    })
  },
  getByUser (data) {
    return axiosApi({
      ...apiList.getByUser,
      // formData: true,
      data
    })
  },
}
